package com.disease.chronic.Mappers;

import com.disease.chronic.pojo.Device;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DeviceMapper {
    int deleteByPrimaryKey(String deviceId);

    int insert(Device record);

    int insertSelective(Device record);

    @Select("SELECT DEVICEID, USERNAME, NAME, STATUS FROM \"DEVICE\" WHERE USERNAME = #{username}")
    @Result(column = "DEVICEID", property = "deviceId")
    List<Device> selectByUsername(String username);

    Device selectByPrimaryKey(String deviceId);

    int updateByPrimaryKeySelective(Device record);

    int updateByPrimaryKey(Device record);
}
